import { EDifficulty, ETag, type IChallenge } from '../types/challenge';
import { sortChallengesByDifficulty } from '../utils/challenges.helper';

const challenges = new Map<string, IChallenge>([
  [
    'counter',
    {
      title: 'Counter',
      description: 'Create a simple counter with increment and decrement buttons',
      link: 'counter',
      difficulty: EDifficulty.Easy,
      developer: 'sadanandpai',
      tags: [ETag.interview],
    },
  ],
  [
    'anagram-checker',
    {
      title: 'Anagram Checker',
      description: 'Build a tool to check if two words are anagrams',
      link: 'anagram-checker',
      difficulty: EDifficulty.Easy,
      developer: 'Manmit Tiwade',
      tags: [],
    },
  ],
  [
    'image-gallery',
    {
      title: 'Image Gallery',
      description: 'Create a responsive grid of images with lightbox preview',
      link: 'image-gallery',
      difficulty: EDifficulty.Easy,
      developer: 'Bhushan1019',
      tags: [ETag.interview],
    },
  ],
  [
    'accordion',
    {
      title: 'Accordion',
      description: 'Implement collapsible content sections with smooth animations',
      link: 'accordion',
      developer: 'NikhilJHA01',
      difficulty: EDifficulty.Easy,
      tags: [ETag.interview],
    },
  ],
  [
    'background-changer',
    {
      title: 'Background Changer',
      description: 'Build a tool to change page background color dynamically',
      link: 'background-changer',
      developer: 'AdityaSuryawanshi',
      difficulty: EDifficulty.Easy,
      tags: [],
    },
  ],
  [
    'light-dark-mode',
    {
      title: 'Light Dark Mode',
      description: 'Implement theme switching between light and dark modes',
      link: 'light-dark-mode',
      difficulty: EDifficulty.Easy,
      developer: 'NikhilJHA01',
      tags: [],
    },
  ],
  [
    'your-sport',
    {
      title: 'Your Sport',
      description: 'Create a sports selection interface with visual feedback',
      link: 'your-sport',
      difficulty: EDifficulty.Easy,
      developer: 'Sumitwarrior7',
      tags: [],
    },
  ],
  [
    'table-colorizer',
    {
      title: 'Table Colorizer',
      description: 'Build a table with customizable row and column colors',
      link: 'table-colorizer',
      difficulty: EDifficulty.Easy,
      developer: 'ravi02205',
      tags: [],
    },
  ],
  [
    'guess-number',
    {
      title: 'Guess the number',
      description: 'Create a number guessing game with hints',
      link: 'guess-number',
      difficulty: EDifficulty.Easy,
      developer: 'deepakrajkranti',
      tags: [ETag.interview],
    },
  ],
  [
    'pagination',
    {
      title: 'Pagination',
      description: 'Implement numbered page navigation for content',
      link: 'pagination',
      difficulty: EDifficulty.Easy,
      developer: 'Pancratzia',
      tags: [],
    },
  ],
  [
    'stack',
    {
      title: 'Stack',
      description: 'Visualize stack data structure operations (push/pop)',
      link: 'stack',
      difficulty: EDifficulty.Easy,
      developer: 'kumaratul60',
      tags: [],
    },
  ],
  [
    'word-count',
    {
      title: 'Word Count',
      description: 'Build a tool to count words and characters in text',
      link: 'word-count',
      difficulty: EDifficulty.Easy,
      developer: 'Sumitwarrior7',
      tags: [],
    },
  ],
  [
    'temperature-converter',
    {
      title: 'Temperature Converter',
      description: 'Convert between Celsius and Fahrenheit units',
      link: 'temperature-converter',
      difficulty: EDifficulty.Easy,
      developer: 'Sumitwarrior7',
      tags: [],
    },
  ],
  [
    'star-rating',
    {
      title: 'Star Rating',
      description: 'Create an interactive star rating component',
      link: 'star-rating',
      difficulty: EDifficulty.Easy,
      developer: 'NikhilJHA01',
      tags: [ETag.interview],
    },
  ],
  [
    'telephone-formatter',
    {
      title: 'Telephone formatter',
      description: 'Format phone numbers automatically as user types',
      link: 'telephone-formatter',
      difficulty: EDifficulty.Easy,
      developer: 'arpansaha13',
      tags: [ETag.interview],
    },
  ],
  [
    'string-transformers',
    {
      title: 'String transformers',
      description: 'Build a tool to transform text case (upper/lower/title)',
      link: 'string-transformers',
      difficulty: EDifficulty.Easy,
      developer: 'arpansaha13',
      tags: [ETag.interview],
    },
  ],
  [
    'tic-tac-toe',
    {
      title: 'Tic Tac Toe',
      description: 'Implement the classic 3x3 grid game with win detection',
      link: 'tic-tac-toe',
      difficulty: EDifficulty.Easy,
      developer: 'rashidtvmr',
      tags: [ETag.interview],
    },
  ],
  [
    'expense-tracker',
    {
      title: 'Expense Tracker',
      description: 'Create a simple expense logging application',
      link: 'expense-tracker',
      difficulty: EDifficulty.Easy,
      developer: 'harsh472000',
      tags: [],
    },
  ],
  [
    '25-5-clock',
    {
      title: '25-5 Clock',
      description: 'Build a Pomodoro timer with work/break intervals',
      link: '25-5-clock',
      difficulty: EDifficulty.Easy,
      developer: 'caesar003',
      tags: [],
    },
  ],
  [
    'bmi-calculator',
    {
      title: 'BMI Calculator',
      description: 'Calculate Body Mass Index from height and weight inputs',
      link: 'bmi-calculator',
      difficulty: EDifficulty.Easy,
      developer: 'ashikjhonson',
      tags: [],
    },
  ],
  [
    'stepper',
    {
      title: 'Stepper',
      description: 'Create a multi-step form progress indicator',
      link: 'stepper',
      difficulty: EDifficulty.Easy,
      developer: 'codechitra',
      tags: [ETag.interview],
      isNew: true,
    },
  ],
  [
    'calculator',
    {
      title: 'Calculator',
      description: 'Build a calculator with basic arithmetic operations',
      link: 'calculator',
      difficulty: EDifficulty.Medium,
      developer: 'liza',
      tags: [ETag.interview],
    },
  ],
  [
    'color-mixer',
    {
      title: 'Color Mixer',
      description: 'Create a tool to mix RGB colors with visual output',
      link: 'color-mixer',
      difficulty: EDifficulty.Medium,
      developer: 'Sumitwarrior7',
      tags: [],
    },
  ],
  [
    'traffic-lights',
    {
      title: 'Traffic Lights',
      description: 'Simulate traffic light sequence with timed transitions',
      link: 'traffic-lights',
      difficulty: EDifficulty.Medium,
      developer: 'rishabhm05',
      tags: [ETag.interview],
    },
  ],
  [
    'email-templates',
    {
      title: 'Email Templates',
      description: 'Build a customizable email template editor',
      link: 'email-templates',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [],
    },
  ],
  [
    'toast-popup',
    {
      title: 'Toast Popup',
      description: 'Create timed notification messages that auto-dismiss',
      link: 'toast-popup',
      difficulty: EDifficulty.Medium,
      developer: 'deepu0',
      tags: [ETag.interview],
    },
  ],
  [
    'modal-popup',
    {
      title: 'Modal Popup',
      description: 'Implement a popup dialog with overlay and close functionality',
      link: 'modal-popup',
      difficulty: EDifficulty.Medium,
      developer: 'rishabhm05',
      tags: [ETag.interview],
    },
  ],
  [
    'password-strength',
    {
      title: 'Password Strength',
      description: 'Show visual feedback on password complexity',
      link: 'password-strength',
      difficulty: EDifficulty.Medium,
      developer: 'deepu0',
      tags: [ETag.interview],
    },
  ],
  [
    'grid-lights',
    {
      title: 'Grid Lights',
      description: 'Create an interactive light grid with toggle functionality',
      link: 'grid-lights',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [ETag.interview],
      isNew: true,
    },
  ],
  [
    'column-table',
    {
      title: 'Column Table',
      description: 'Build a sortable and filterable data table',
      link: 'column-table',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [ETag.interview],
    },
  ],
  [
    'todo-list',
    {
      title: 'Todo List',
      description: 'Create a task manager with add/delete/complete functionality',
      link: 'todo-list',
      difficulty: EDifficulty.Medium,
      developer: 'deepakrajkranti',
      tags: [ETag.interview],
    },
  ],
  [
    'emoji-picker',
    {
      title: 'Emoji Picker',
      description: 'Build a component to select and insert emojis',
      link: 'emoji-picker',
      difficulty: EDifficulty.Medium,
      developer: 'jeevaramanathan',
      tags: [],
    },
  ],
  [
    'investment-calculator',
    {
      title: 'Investment Calculator',
      description: 'Calculate investment growth with compound interest',
      link: 'investment-calculator',
      difficulty: EDifficulty.Medium,
      developer: 'insharahAyyubi',
      tags: [],
    },
  ],
  [
    'stopwatch',
    {
      title: 'Stopwatch',
      description: 'Implement a stopwatch with lap time functionality',
      link: 'stopwatch',
      difficulty: EDifficulty.Medium,
      developer: 'rashidtvmr',
      tags: [ETag.interview],
    },
  ],
  [
    'progressbar',
    {
      title: 'Progressbar',
      description: 'Create an animated progress indicator',
      link: 'progressbar',
      difficulty: EDifficulty.Medium,
      developer: 'dhanu084',
      tags: [],
    },
  ],
  [
    'quiz-app',
    {
      title: 'Quiz App',
      description: 'Build an interactive quiz with scoring system',
      link: 'quiz-app',
      difficulty: EDifficulty.Medium,
      developer: 'AbhilashMadi',
      tags: [ETag.interview],
    },
  ],
  [
    'chess-board',
    {
      title: 'Chess Board',
      description: 'Create an interactive chess board with piece movement',
      link: 'chess-board',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [ETag.interview],
    },
  ],
  [
    'nested-dropdown',
    {
      title: 'Nested Dropdown',
      description: 'Implement a dropdown menu with multiple levels',
      link: 'nested-dropdown',
      difficulty: EDifficulty.Medium,
      developer: 'AnkitKTrivedi',
      tags: [],
    },
  ],
  [
    'food-recipe',
    {
      title: 'Food Recipe',
      description: 'Build a recipe display with ingredients and instructions',
      link: 'food-recipe',
      difficulty: EDifficulty.Medium,
      developer: 'Kei-K23',
      tags: [],
    },
  ],
  [
    'nested-checkbox',
    {
      title: 'Nested Checkbox',
      description: 'Create hierarchical checkboxes with parent-child relationships',
      link: 'nested-checkbox',
      difficulty: EDifficulty.Hard,
      developer: 'SujithGunasekaran',
      tags: [ETag.interview],
    },
  ],
  [
    'nested-comments',
    {
      title: 'Nested Comments',
      description: 'Implement a threaded comment system with replies',
      link: 'nested-comments',
      difficulty: EDifficulty.Hard,
      developer: 'Akshay-Omkar',
      // contributors: ['arpansaha13'],
      tags: [ETag.interview],
      isNew: true,
    },
  ],
  [
    'password-generator',
    {
      title: 'Password Generator',
      description: 'Create a tool to generate secure random passwords',
      link: 'password-generator',
      difficulty: EDifficulty.Medium,
      developer: 'Kei-K23',
      tags: [],
    },
  ],
  [
    'shape-drawer',
    {
      title: 'Shape Drawer',
      description:
        'Create an interactive shape drawing application. The application should allow users to draw circles and squares on click. Implement multiple undo/redo steps.',
      link: 'shape-drawer',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [ETag.interview],
      isNew: true,
    },
  ],
  [
    'transfer-list',
    {
      title: 'Transfer List',
      description: 'Build a UI for moving items between two lists',
      link: 'transfer-list',
      difficulty: EDifficulty.Medium,
      developer: 'DeePaK-HeeRaKaRi',
      tags: [ETag.interview],
    },
  ],
  [
    'infinite-scroll',
    {
      title: 'Infinite Scroll (online)',
      description: 'Implement endless scrolling with API data loading',
      link: 'infinite-scroll',
      difficulty: EDifficulty.Medium,
      developer: 'ayush-dutt-sharma',
      tags: [ETag.interview],
    },
  ],
  [
    'match-pair',
    {
      title: 'Match Pair',
      description: 'Create a memory matching card game',
      link: 'match-pair',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [ETag.interview],
    },
  ],
  [
    'word-connect',
    {
      title: 'Word Connect',
      description: 'Build a word association game with complex logic',
      link: 'word-connect',
      difficulty: EDifficulty.Hard,
      developer: 'sadanandpai',
      tags: [ETag.interview],
      isNew: true,
    },
  ],
  [
    'otp',
    {
      title: 'OTP',
      description: 'Implement a one-time password input component',
      link: 'otp',
      difficulty: EDifficulty.Hard,
      developer: 'rishabhm05',
      tags: [ETag.interview],
    },
  ],
  [
    'file-explorer',
    {
      title: 'File Explorer',
      description: 'Create a hierarchical file system browser',
      link: 'file-explorer',
      difficulty: EDifficulty.Hard,
      developer: 'sadanandpai',
      tags: [ETag.interview],
    },
  ],
  [
    'autocomplete-offline',
    {
      title: 'Typeahead (offline)',
      description: 'Build search suggestions from local dataset',
      link: 'autocomplete-offline',
      sourceCodeLink: 'autocomplete',
      difficulty: EDifficulty.Hard,
      developer: 'deepu0',
      tags: [ETag.interview],
    },
  ],
  [
    'autocomplete-online',
    {
      title: 'Typeahead (online)',
      description: 'Implement live search suggestions from API',
      link: 'autocomplete-online',
      sourceCodeLink: 'autocomplete',
      difficulty: EDifficulty.Hard,
      developer: 'deepu0',
      tags: [ETag.interview],
    },
  ],
  [
    'water-balancer',
    {
      title: 'Water Balancer',
      description: 'Create a water container balancing visualization',
      link: 'water-balancer',
      difficulty: EDifficulty.Hard,
      developer: 'sadanandpai',
      tags: [],
      isNew: true,
    },
  ],
  [
    'inline-options',
    {
      title: 'Inline Options',
      description: 'Build an inline editable settings component',
      link: 'inline-options',
      difficulty: EDifficulty.Easy,
      developer: 'takshch',
      tags: [],
    },
  ],
  [
    'digital-clock',
    {
      title: 'Digital Clock',
      description: 'Create a digital clock with time display',
      link: 'digital-clock',
      difficulty: EDifficulty.Medium,
      developer: 'Syamsai-Polavarapu',
      tags: [],
      isNew: true,
    },
  ],
  [
    '15puzzle',
    {
      title: '15 Puzzle',
      description: 'Implement the classic sliding number puzzle game',
      link: '15puzzle',
      difficulty: EDifficulty.Medium,
      developer: 'Bateusz',
      tags: [],
      isNew: true,
    },
  ],
  [
    'feedback-modal',
    {
      title: 'Feedback Modal',
      description: 'Create a popup form for user feedback submission',
      link: 'feedback-modal',
      difficulty: EDifficulty.Medium,
      developer: 'ssudipta',
      tags: [],
    },
  ],
  [
    'memory-game',
    {
      title: 'Memory Game',
      description: 'Build a card matching memory game',
      link: 'memory-game',
      difficulty: EDifficulty.Medium,
      developer: 'Akshat-Gupta',
      tags: [],
      isNew: true,
    },
  ],
  [
    'chip-input',
    {
      title: 'Chips Input',
      description: 'Create an input field that generates tags/chips',
      link: 'chip-input',
      difficulty: EDifficulty.Medium,
      developer: 'Akshay-Omkar',
      tags: [ETag.interview],
      isNew: true,
    },
  ],
  [
    'tabs',
    {
      title: 'Tab',
      description: 'Implement a tabbed interface component',
      link: 'tabs',
      difficulty: EDifficulty.Easy,
      developer: 'Akshay-Omkar',
      tags: [],
      isNew: true,
    },
  ],
  [
    'drag-drop',
    {
      title: 'Drag-Drop',
      description: 'Create draggable elements with drop targets',
      link: 'drag-drop',
      difficulty: EDifficulty.Medium,
      developer: 'Akshay-Omkar',
      tags: [],
      isNew: true,
    },
  ],
  [
    'circles',
    {
      title: 'Circles',
      description: 'Build an interactive circle drawing application',
      link: 'circles',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [],
      isNew: true,
    },
  ],
  [
    'analog-clock',
    {
      title: 'Analog Clock',
      description: 'Create a working analog clock with moving hands',
      link: 'analog-clock',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [],
      isNew: true,
    },
  ],
  [
    'advanced-counter',
    {
      title: 'Advanced Counter',
      description: 'Build a counter with history tracking and presets',
      link: 'advanced-counter',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [ETag.interview],
    },
  ],
  [
    'meeting-calendar',
    {
      title: 'Meeting Calendar',
      description: 'Create a calendar with meeting scheduling functionality',
      link: 'meeting-calendar',
      difficulty: EDifficulty.Hard,
      developer: 'sadanandpai',
      tags: [ETag.interview],
      isNew: true,
    },
  ],
  [
    'anuvadak',
    {
      title: 'Anuvadak',
      description:
        'A language translation app with support for 50+ languages using OpenL-Translate API',
      link: 'anuvadak',
      difficulty: EDifficulty.Medium,
      developer: 'Devdeep8',
      tags: [],
      isNew: true,
    },
  ],
  [
    'reversi',
    {
      title: 'Reversi',
      description: 'Build the classic board game Reversi (Othello) with game logic and UI',
      link: 'reversi',
      difficulty: EDifficulty.Medium,
      developer: 'sadanandpai',
      tags: [],
    },
  ],
]);

export const reactChallenges = sortChallengesByDifficulty(challenges);
